package com.org.devg.devgfilesync.config.init;

import com.org.devg.devgfilesync.config.batch.FileSyncTask;
import com.org.devg.devgfilesync.web.file.service.FileService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class InitSyncStatus implements InitializingBean {

  @Autowired
  private FileService fileService;

  @Override
  public void afterPropertiesSet() throws Exception {
    fileService.updateSyncStop(FileSyncTask.fileSync);
  }
}
